package cn.tedu.shoot;

import java.awt.image.BufferedImage;

public class Bullet extends FlyingObject{
	public int xspeed;
	private int yspeed;
	public Bullet(int x,int y){
		super(15,31,x,y);//15.31
		xspeed = 1;
		yspeed = 3;
	}
	public void step() {
		x+=xspeed;
		y-=yspeed;
	}
	
		public BufferedImage getImage() {
			if(isLife()) {
					return Images.bullet;
			}else if(isDead()) {
				state = REMOVE;
			}
			return null;
		}
		

	public boolean outOfBounds() {
		return this.y<=-this.height||this.x<=0||this.x>=World.WIDTH;
	}
}
